import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import store from './stores/index'
import axios from 'axios'
import App from './App'
import reportWebVitals from './reportWebVitals'
import './styles/resetAntd.scss'

axios.defaults.baseURL = 'http://localhost:5000/api'
axios.defaults.headers.post[ 'Content-Type' ] = 'application/x-www-form-urlencoded'
axios.defaults.headers.common[ 'Authorization' ] = localStorage.getItem('token') ? `Bearer ${ localStorage.getItem('token') }` : ''

ReactDOM.render(
  <Provider store={store}>
    <App />
  </Provider>,
  document.getElementById('root')
)

reportWebVitals()
